//
// Created by 123 on 2025/1/8.
//

#include "queue"
#include "string"
#include "iostream"
using namespace std;

class Person{
public:
    string name;
    int age;
public:
    Person(string name,int age){
        this->name = name;
        this->age = age;
    }
};

void test(){
    queue<Person> q;
    Person p1("zs",11);
    Person p2("ls",22);
    Person p3("ww",33);
    q.push(p1);
    q.push(p2);
    q.push(p3);

    while (!q.empty()){
        cout << "queue front name=" << q.front().name << " age=" << q.front().age << endl;
        cout << "queue back name=" << q.back().name << " age=" << q.back().age << endl;
        cout << "-------------------------------------" << endl;
        q.pop();
    }
    cout << "queue size = "<< q.size() << endl;
}

int main131(){
    test();
}